/*
'===============================================================================
'  Generated From - CSharp_EasyObject_BusinessEntity.vbgen
' 
'  ** IMPORTANT  ** 
'  How to Generate your stored procedures:
' 
'  SQL      = SQL_DAAB_StoredProcs.vbgen
'  
'  This object is 'abstract' which means you need to inherit from it to be able
'  to instantiate it.  This is very easily done. You can override properties and
'  methods in your derived class, this allows you to regenerate this class at any
'  time and not worry about overwriting custom code. 
'
'  NEVER EDIT THIS FILE.
'
'  public class YourObject :  _YourObject
'  {
'
'  }
'
'===============================================================================
*/

// Generated by MyGeneration Version # (1.3.0.3)

using System;
using System.Data;
using System.Data.Common;
using System.Configuration;
using System.Collections;
using System.Collections.Specialized;
using System.Xml;
using System.IO;

using Microsoft.Practices.EnterpriseLibrary.Data;
using NCI.EasyObjects;

namespace CMS.DAL
{

	#region Schema

	public class HotelSchema : NCI.EasyObjects.Schema
	{
		private static ArrayList _entries;
		public static SchemaItem HotelID = new SchemaItem("HotelID", DbType.Int32, true, false, false, true, false, false);
		public static SchemaItem Title1 = new SchemaItem("Title1", DbType.String, SchemaItemJustify.None, 250, true, false, false, false);
		public static SchemaItem Title2 = new SchemaItem("Title2", DbType.String, SchemaItemJustify.None, 250, true, false, false, false);
		public static SchemaItem Title3 = new SchemaItem("Title3", DbType.String, SchemaItemJustify.None, 250, true, false, false, false);
		public static SchemaItem InitContent1 = new SchemaItem("InitContent1", DbType.String, SchemaItemJustify.None, 1073741823, true, false, false, false);
		public static SchemaItem InitContent2 = new SchemaItem("InitContent2", DbType.String, SchemaItemJustify.None, 1073741823, true, false, false, false);
		public static SchemaItem InitContent3 = new SchemaItem("InitContent3", DbType.String, SchemaItemJustify.None, 1073741823, true, false, false, false);
		public static SchemaItem Content1 = new SchemaItem("Content1", DbType.String, SchemaItemJustify.None, 1073741823, true, false, false, false);
		public static SchemaItem Content2 = new SchemaItem("Content2", DbType.String, SchemaItemJustify.None, 1073741823, true, false, false, false);
		public static SchemaItem Content3 = new SchemaItem("Content3", DbType.String, SchemaItemJustify.None, 1073741823, true, false, false, false);
		public static SchemaItem PriceFrom1 = new SchemaItem("PriceFrom1", DbType.Double, false, true, false, false, false, false);
		public static SchemaItem PriceFrom2 = new SchemaItem("PriceFrom2", DbType.Double, false, true, false, false, false, false);
		public static SchemaItem PriceFrom3 = new SchemaItem("PriceFrom3", DbType.Double, false, true, false, false, false, false);
		public static SchemaItem PriceFromTo1 = new SchemaItem("PriceFromTo1", DbType.Double, false, true, false, false, false, false);
		public static SchemaItem PriceFromTo2 = new SchemaItem("PriceFromTo2", DbType.Double, false, true, false, false, false, false);
		public static SchemaItem PriceFromTo3 = new SchemaItem("PriceFromTo3", DbType.Double, false, true, false, false, false, false);
		public static SchemaItem Image = new SchemaItem("Image", DbType.String, SchemaItemJustify.None, 250, true, false, false, false);
		public static SchemaItem Status = new SchemaItem("Status", DbType.Int32, false, false, false, false, false, false);
		public static SchemaItem Priority = new SchemaItem("Priority", DbType.Int32, false, false, false, false, false, false);
		public static SchemaItem StarRating = new SchemaItem("StarRating", DbType.Int32, false, true, false, false, false, false);
		public static SchemaItem Address1 = new SchemaItem("Address1", DbType.String, SchemaItemJustify.None, 250, true, false, false, false);
		public static SchemaItem Address2 = new SchemaItem("Address2", DbType.String, SchemaItemJustify.None, 250, true, false, false, false);
		public static SchemaItem Address3 = new SchemaItem("Address3", DbType.String, SchemaItemJustify.None, 250, true, false, false, false);
		public static SchemaItem GoogleMapAddress = new SchemaItem("GoogleMapAddress", DbType.String, SchemaItemJustify.None, 500, true, false, false, false);
		public static SchemaItem CityID = new SchemaItem("CityID", DbType.Int32, false, true, false, false, false, false);
		public static SchemaItem VideoLink = new SchemaItem("VideoLink", DbType.String, SchemaItemJustify.None, 1073741823, true, false, false, false);

		public override ArrayList SchemaEntries
		{
			get
			{
				if (_entries == null )
				{
					_entries = new ArrayList();
					_entries.Add(HotelSchema.HotelID);
					_entries.Add(HotelSchema.Title1);
					_entries.Add(HotelSchema.Title2);
					_entries.Add(HotelSchema.Title3);
					_entries.Add(HotelSchema.InitContent1);
					_entries.Add(HotelSchema.InitContent2);
					_entries.Add(HotelSchema.InitContent3);
					_entries.Add(HotelSchema.Content1);
					_entries.Add(HotelSchema.Content2);
					_entries.Add(HotelSchema.Content3);
					_entries.Add(HotelSchema.PriceFrom1);
					_entries.Add(HotelSchema.PriceFrom2);
					_entries.Add(HotelSchema.PriceFrom3);
					_entries.Add(HotelSchema.PriceFromTo1);
					_entries.Add(HotelSchema.PriceFromTo2);
					_entries.Add(HotelSchema.PriceFromTo3);
					_entries.Add(HotelSchema.Image);
					_entries.Add(HotelSchema.Status);
					_entries.Add(HotelSchema.Priority);
					_entries.Add(HotelSchema.StarRating);
					_entries.Add(HotelSchema.Address1);
					_entries.Add(HotelSchema.Address2);
					_entries.Add(HotelSchema.Address3);
					_entries.Add(HotelSchema.GoogleMapAddress);
					_entries.Add(HotelSchema.CityID);
					_entries.Add(HotelSchema.VideoLink);
				}
				return _entries;
			}
		}
		
		public static bool HasAutoKey 
		{
			get { return true;	}
		}

		public static bool HasRowID 
		{
			get { return false;	}
		}
	}
	#endregion

	public abstract class _Hotel : EasyObject
	{

		public _Hotel()
		{
			HotelSchema _schema = new HotelSchema();
			this.SchemaEntries = _schema.SchemaEntries;
			this.SchemaGlobal = "dbo";
		}
		
		public override void FlushData() 	 
		{ 	 
			this._whereClause = null; 	 
			this._aggregateClause = null; 	 
			base.FlushData(); 	 
		}
			   
		/// <summary>
		/// Loads the business object with info from the database, based on the requested primary key.
		/// </summary>
		/// <param name="HotelID"></param>
		/// <returns>A Boolean indicating success or failure of the query</returns>
		public bool LoadByPrimaryKey(int HotelID)
		{
			switch(this.DefaultCommandType)
			{
				case CommandType.StoredProcedure:
					ListDictionary parameters = new ListDictionary();

					// Add in parameters
					parameters.Add(HotelSchema.HotelID.FieldName, HotelID);

					return base.LoadFromSql(this.SchemaStoredProcedureWithSeparator + "sp_GetHotel", parameters, CommandType.StoredProcedure);

				case CommandType.Text:
					this.Query.ClearAll();
					this.Where.WhereClauseReset();
					this.Where.HotelID.Value = HotelID;
					return this.Query.Load();

				default:
					throw new ArgumentException("Invalid CommandType", "commandType");
			}
		}
	
		/// <summary>
		/// Loads all records from the table.
		/// </summary>
		/// <returns>A Boolean indicating success or failure of the query</returns>
		public bool LoadAll()
		{
			switch(this.DefaultCommandType)
			{
				case CommandType.StoredProcedure:
					return base.LoadFromSql(this.SchemaStoredProcedureWithSeparator + "sp_GetAllHotel", null, CommandType.StoredProcedure);

				case CommandType.Text:
					this.Query.ClearAll();
					this.Where.WhereClauseReset();
					return this.Query.Load();

				default:
					throw new ArgumentException("Invalid CommandType", "commandType");
			}
		}

		/// <summary>
		/// Adds a new record to the internal table.
		/// </summary>
		public override void AddNew()
		{
			base.AddNew();
			this.ApplyDefaults();
		}

		/// <summary>
		/// Apply any default values to columns
		/// </summary>
		protected override void ApplyDefaults()
		{
		}

		protected override DbCommand GetInsertCommand(CommandType commandType)
		{	
			DbCommand dbCommand;

			// Create the Database object, using the default database service. The
			// default database service is determined through configuration.
			Database db = GetDatabase();

			switch(commandType)
			{
				case CommandType.StoredProcedure:
					string sqlCommand = this.SchemaStoredProcedureWithSeparator + "sp_AddHotel";
					dbCommand = db.GetStoredProcCommand(sqlCommand);

					db.AddParameter(dbCommand, "HotelID", DbType.Int32, 0, ParameterDirection.Output, true, 0, 0, "HotelID", DataRowVersion.Default, Convert.DBNull);
					CreateParameters(db, dbCommand);
					
					return dbCommand;

				case CommandType.Text:
					this.Query.ClearAll();
					this.Where.WhereClauseReset();
					foreach(SchemaItem item in this.SchemaEntries)
					{
						if (!item.IsComputed)
						{
							if ((item.IsAutoKey && this.IdentityInsert) || !item.IsAutoKey)
							{
								this.Query.AddInsertColumn(item);
							}
						}
					}
					dbCommand = this.Query.GetInsertCommandWrapper();

					dbCommand.Parameters.Clear();
					if (this.IdentityInsert)
					{
						db.AddInParameter(dbCommand, "HotelID", DbType.Int32, "HotelID", DataRowVersion.Default);
					}
					else
					{
						db.AddParameter(dbCommand, "HotelID", DbType.Int32, 0, ParameterDirection.Output, true, 0, 0, "HotelID", DataRowVersion.Default, Convert.DBNull);
					}
					CreateParameters(db, dbCommand);

					return dbCommand;

				default:
					throw new ArgumentException("Invalid CommandType", "commandType");
			}
		}

		protected override DbCommand GetUpdateCommand(CommandType commandType)
		{
            DbCommand dbCommand;

			// Create the Database object, using the default database service. The
			// default database service is determined through configuration.
			Database db = GetDatabase();

			switch(commandType)
			{
				case CommandType.StoredProcedure:
					string sqlCommand = this.SchemaStoredProcedureWithSeparator + "sp_UpdateHotel";
					dbCommand = db.GetStoredProcCommand(sqlCommand);

					db.AddInParameter(dbCommand, "HotelID", DbType.Int32, "HotelID", DataRowVersion.Current);
					CreateParameters(db, dbCommand);
					
					return dbCommand;

				case CommandType.Text:
					this.Query.ClearAll();
					foreach(SchemaItem item in this.SchemaEntries)
					{
						if (!(item.IsAutoKey || item.IsComputed))
						{
							this.Query.AddUpdateColumn(item);
						}
					}

					this.Where.WhereClauseReset();
					this.Where.HotelID.Operator = WhereParameter.Operand.Equal;
					dbCommand = this.Query.GetUpdateCommandWrapper();

					dbCommand.Parameters.Clear();
					CreateParameters(db, dbCommand);
					db.AddInParameter(dbCommand, "HotelID", DbType.Int32, "HotelID", DataRowVersion.Current);
					
					return dbCommand;

				default:
					throw new ArgumentException("Invalid CommandType", "commandType");
			}
		}

		protected override DbCommand GetDeleteCommand(CommandType commandType)
		{
            DbCommand dbCommand;

			// Create the Database object, using the default database service. The
			// default database service is determined through configuration.
			Database db = GetDatabase();

			switch(commandType)
			{
				case CommandType.StoredProcedure:
					string sqlCommand = this.SchemaStoredProcedureWithSeparator + "sp_DeleteHotel";
					dbCommand = db.GetStoredProcCommand(sqlCommand);
					db.AddInParameter(dbCommand, "HotelID", DbType.Int32, "HotelID", DataRowVersion.Current);
					
					return dbCommand;

				case CommandType.Text:
					this.Query.ClearAll();
					this.Where.WhereClauseReset();
					this.Where.HotelID.Operator = WhereParameter.Operand.Equal;
					dbCommand = this.Query.GetDeleteCommandWrapper();

					dbCommand.Parameters.Clear();
					db.AddInParameter(dbCommand, "HotelID", DbType.Int32, "HotelID", DataRowVersion.Current);
					
					return dbCommand;

				default:
					throw new ArgumentException("Invalid CommandType", "commandType");
			}
		}

		private void CreateParameters(Database db, DbCommand dbCommand)
		{
			db.AddInParameter(dbCommand, "Title1", DbType.String, "Title1", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "Title2", DbType.String, "Title2", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "Title3", DbType.String, "Title3", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "InitContent1", DbType.String, "InitContent1", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "InitContent2", DbType.String, "InitContent2", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "InitContent3", DbType.String, "InitContent3", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "Content1", DbType.String, "Content1", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "Content2", DbType.String, "Content2", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "Content3", DbType.String, "Content3", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "PriceFrom1", DbType.Double, "PriceFrom1", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "PriceFrom2", DbType.Double, "PriceFrom2", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "PriceFrom3", DbType.Double, "PriceFrom3", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "PriceFromTo1", DbType.Double, "PriceFromTo1", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "PriceFromTo2", DbType.Double, "PriceFromTo2", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "PriceFromTo3", DbType.Double, "PriceFromTo3", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "Image", DbType.String, "Image", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "Status", DbType.Int32, "Status", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "Priority", DbType.Int32, "Priority", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "StarRating", DbType.Int32, "StarRating", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "Address1", DbType.String, "Address1", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "Address2", DbType.String, "Address2", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "Address3", DbType.String, "Address3", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "GoogleMapAddress", DbType.String, "GoogleMapAddress", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "CityID", DbType.Int32, "CityID", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "VideoLink", DbType.String, "VideoLink", DataRowVersion.Current);
		}
		
		#region Properties
		public virtual int HotelID
		{
			get
			{
				return this.GetInteger(HotelSchema.HotelID.FieldName);
	    	}
			set
			{
				this.SetInteger(HotelSchema.HotelID.FieldName, value);
			}
		}
		public virtual string Title1
		{
			get
			{
				return this.GetString(HotelSchema.Title1.FieldName);
	    	}
			set
			{
				this.SetString(HotelSchema.Title1.FieldName, value);
			}
		}
		public virtual string Title2
		{
			get
			{
				return this.GetString(HotelSchema.Title2.FieldName);
	    	}
			set
			{
				this.SetString(HotelSchema.Title2.FieldName, value);
			}
		}
		public virtual string Title3
		{
			get
			{
				return this.GetString(HotelSchema.Title3.FieldName);
	    	}
			set
			{
				this.SetString(HotelSchema.Title3.FieldName, value);
			}
		}
		public virtual string InitContent1
		{
			get
			{
				return this.GetString(HotelSchema.InitContent1.FieldName);
	    	}
			set
			{
				this.SetString(HotelSchema.InitContent1.FieldName, value);
			}
		}
		public virtual string InitContent2
		{
			get
			{
				return this.GetString(HotelSchema.InitContent2.FieldName);
	    	}
			set
			{
				this.SetString(HotelSchema.InitContent2.FieldName, value);
			}
		}
		public virtual string InitContent3
		{
			get
			{
				return this.GetString(HotelSchema.InitContent3.FieldName);
	    	}
			set
			{
				this.SetString(HotelSchema.InitContent3.FieldName, value);
			}
		}
		public virtual string Content1
		{
			get
			{
				return this.GetString(HotelSchema.Content1.FieldName);
	    	}
			set
			{
				this.SetString(HotelSchema.Content1.FieldName, value);
			}
		}
		public virtual string Content2
		{
			get
			{
				return this.GetString(HotelSchema.Content2.FieldName);
	    	}
			set
			{
				this.SetString(HotelSchema.Content2.FieldName, value);
			}
		}
		public virtual string Content3
		{
			get
			{
				return this.GetString(HotelSchema.Content3.FieldName);
	    	}
			set
			{
				this.SetString(HotelSchema.Content3.FieldName, value);
			}
		}
		public virtual double PriceFrom1
		{
			get
			{
				return this.GetDouble(HotelSchema.PriceFrom1.FieldName);
	    	}
			set
			{
				this.SetDouble(HotelSchema.PriceFrom1.FieldName, value);
			}
		}
		public virtual double PriceFrom2
		{
			get
			{
				return this.GetDouble(HotelSchema.PriceFrom2.FieldName);
	    	}
			set
			{
				this.SetDouble(HotelSchema.PriceFrom2.FieldName, value);
			}
		}
		public virtual double PriceFrom3
		{
			get
			{
				return this.GetDouble(HotelSchema.PriceFrom3.FieldName);
	    	}
			set
			{
				this.SetDouble(HotelSchema.PriceFrom3.FieldName, value);
			}
		}
		public virtual double PriceFromTo1
		{
			get
			{
				return this.GetDouble(HotelSchema.PriceFromTo1.FieldName);
	    	}
			set
			{
				this.SetDouble(HotelSchema.PriceFromTo1.FieldName, value);
			}
		}
		public virtual double PriceFromTo2
		{
			get
			{
				return this.GetDouble(HotelSchema.PriceFromTo2.FieldName);
	    	}
			set
			{
				this.SetDouble(HotelSchema.PriceFromTo2.FieldName, value);
			}
		}
		public virtual double PriceFromTo3
		{
			get
			{
				return this.GetDouble(HotelSchema.PriceFromTo3.FieldName);
	    	}
			set
			{
				this.SetDouble(HotelSchema.PriceFromTo3.FieldName, value);
			}
		}
		public virtual string Image
		{
			get
			{
				return this.GetString(HotelSchema.Image.FieldName);
	    	}
			set
			{
				this.SetString(HotelSchema.Image.FieldName, value);
			}
		}
		public virtual int Status
		{
			get
			{
				return this.GetInteger(HotelSchema.Status.FieldName);
	    	}
			set
			{
				this.SetInteger(HotelSchema.Status.FieldName, value);
			}
		}
		public virtual int Priority
		{
			get
			{
				return this.GetInteger(HotelSchema.Priority.FieldName);
	    	}
			set
			{
				this.SetInteger(HotelSchema.Priority.FieldName, value);
			}
		}
		public virtual int StarRating
		{
			get
			{
				return this.GetInteger(HotelSchema.StarRating.FieldName);
	    	}
			set
			{
				this.SetInteger(HotelSchema.StarRating.FieldName, value);
			}
		}
		public virtual string Address1
		{
			get
			{
				return this.GetString(HotelSchema.Address1.FieldName);
	    	}
			set
			{
				this.SetString(HotelSchema.Address1.FieldName, value);
			}
		}
		public virtual string Address2
		{
			get
			{
				return this.GetString(HotelSchema.Address2.FieldName);
	    	}
			set
			{
				this.SetString(HotelSchema.Address2.FieldName, value);
			}
		}
		public virtual string Address3
		{
			get
			{
				return this.GetString(HotelSchema.Address3.FieldName);
	    	}
			set
			{
				this.SetString(HotelSchema.Address3.FieldName, value);
			}
		}
		public virtual string GoogleMapAddress
		{
			get
			{
				return this.GetString(HotelSchema.GoogleMapAddress.FieldName);
	    	}
			set
			{
				this.SetString(HotelSchema.GoogleMapAddress.FieldName, value);
			}
		}
		public virtual int CityID
		{
			get
			{
				return this.GetInteger(HotelSchema.CityID.FieldName);
	    	}
			set
			{
				this.SetInteger(HotelSchema.CityID.FieldName, value);
			}
		}
		public virtual string VideoLink
		{
			get
			{
				return this.GetString(HotelSchema.VideoLink.FieldName);
	    	}
			set
			{
				this.SetString(HotelSchema.VideoLink.FieldName, value);
			}
		}

		public override string TableName
		{
			get { return "Hotel"; }
		}
		
		#endregion		
		
		#region String Properties
		public virtual string s_HotelID
		{
			get
			{
			    return this.IsColumnNull(HotelSchema.HotelID.FieldName) ? string.Empty : base.GetIntegerAsString(HotelSchema.HotelID.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(HotelSchema.HotelID.FieldName);
			    else
			        this.HotelID = base.SetIntegerAsString(HotelSchema.HotelID.FieldName, value);
			}
		}
		public virtual string s_Title1
		{
			get
			{
			    return this.IsColumnNull(HotelSchema.Title1.FieldName) ? string.Empty : base.GetStringAsString(HotelSchema.Title1.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(HotelSchema.Title1.FieldName);
			    else
			        this.Title1 = base.SetStringAsString(HotelSchema.Title1.FieldName, value);
			}
		}
		public virtual string s_Title2
		{
			get
			{
			    return this.IsColumnNull(HotelSchema.Title2.FieldName) ? string.Empty : base.GetStringAsString(HotelSchema.Title2.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(HotelSchema.Title2.FieldName);
			    else
			        this.Title2 = base.SetStringAsString(HotelSchema.Title2.FieldName, value);
			}
		}
		public virtual string s_Title3
		{
			get
			{
			    return this.IsColumnNull(HotelSchema.Title3.FieldName) ? string.Empty : base.GetStringAsString(HotelSchema.Title3.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(HotelSchema.Title3.FieldName);
			    else
			        this.Title3 = base.SetStringAsString(HotelSchema.Title3.FieldName, value);
			}
		}
		public virtual string s_InitContent1
		{
			get
			{
			    return this.IsColumnNull(HotelSchema.InitContent1.FieldName) ? string.Empty : base.GetStringAsString(HotelSchema.InitContent1.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(HotelSchema.InitContent1.FieldName);
			    else
			        this.InitContent1 = base.SetStringAsString(HotelSchema.InitContent1.FieldName, value);
			}
		}
		public virtual string s_InitContent2
		{
			get
			{
			    return this.IsColumnNull(HotelSchema.InitContent2.FieldName) ? string.Empty : base.GetStringAsString(HotelSchema.InitContent2.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(HotelSchema.InitContent2.FieldName);
			    else
			        this.InitContent2 = base.SetStringAsString(HotelSchema.InitContent2.FieldName, value);
			}
		}
		public virtual string s_InitContent3
		{
			get
			{
			    return this.IsColumnNull(HotelSchema.InitContent3.FieldName) ? string.Empty : base.GetStringAsString(HotelSchema.InitContent3.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(HotelSchema.InitContent3.FieldName);
			    else
			        this.InitContent3 = base.SetStringAsString(HotelSchema.InitContent3.FieldName, value);
			}
		}
		public virtual string s_Content1
		{
			get
			{
			    return this.IsColumnNull(HotelSchema.Content1.FieldName) ? string.Empty : base.GetStringAsString(HotelSchema.Content1.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(HotelSchema.Content1.FieldName);
			    else
			        this.Content1 = base.SetStringAsString(HotelSchema.Content1.FieldName, value);
			}
		}
		public virtual string s_Content2
		{
			get
			{
			    return this.IsColumnNull(HotelSchema.Content2.FieldName) ? string.Empty : base.GetStringAsString(HotelSchema.Content2.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(HotelSchema.Content2.FieldName);
			    else
			        this.Content2 = base.SetStringAsString(HotelSchema.Content2.FieldName, value);
			}
		}
		public virtual string s_Content3
		{
			get
			{
			    return this.IsColumnNull(HotelSchema.Content3.FieldName) ? string.Empty : base.GetStringAsString(HotelSchema.Content3.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(HotelSchema.Content3.FieldName);
			    else
			        this.Content3 = base.SetStringAsString(HotelSchema.Content3.FieldName, value);
			}
		}
		public virtual string s_PriceFrom1
		{
			get
			{
			    return this.IsColumnNull(HotelSchema.PriceFrom1.FieldName) ? string.Empty : base.GetDoubleAsString(HotelSchema.PriceFrom1.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(HotelSchema.PriceFrom1.FieldName);
			    else
			        this.PriceFrom1 = base.SetDoubleAsString(HotelSchema.PriceFrom1.FieldName, value);
			}
		}
		public virtual string s_PriceFrom2
		{
			get
			{
			    return this.IsColumnNull(HotelSchema.PriceFrom2.FieldName) ? string.Empty : base.GetDoubleAsString(HotelSchema.PriceFrom2.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(HotelSchema.PriceFrom2.FieldName);
			    else
			        this.PriceFrom2 = base.SetDoubleAsString(HotelSchema.PriceFrom2.FieldName, value);
			}
		}
		public virtual string s_PriceFrom3
		{
			get
			{
			    return this.IsColumnNull(HotelSchema.PriceFrom3.FieldName) ? string.Empty : base.GetDoubleAsString(HotelSchema.PriceFrom3.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(HotelSchema.PriceFrom3.FieldName);
			    else
			        this.PriceFrom3 = base.SetDoubleAsString(HotelSchema.PriceFrom3.FieldName, value);
			}
		}
		public virtual string s_PriceFromTo1
		{
			get
			{
			    return this.IsColumnNull(HotelSchema.PriceFromTo1.FieldName) ? string.Empty : base.GetDoubleAsString(HotelSchema.PriceFromTo1.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(HotelSchema.PriceFromTo1.FieldName);
			    else
			        this.PriceFromTo1 = base.SetDoubleAsString(HotelSchema.PriceFromTo1.FieldName, value);
			}
		}
		public virtual string s_PriceFromTo2
		{
			get
			{
			    return this.IsColumnNull(HotelSchema.PriceFromTo2.FieldName) ? string.Empty : base.GetDoubleAsString(HotelSchema.PriceFromTo2.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(HotelSchema.PriceFromTo2.FieldName);
			    else
			        this.PriceFromTo2 = base.SetDoubleAsString(HotelSchema.PriceFromTo2.FieldName, value);
			}
		}
		public virtual string s_PriceFromTo3
		{
			get
			{
			    return this.IsColumnNull(HotelSchema.PriceFromTo3.FieldName) ? string.Empty : base.GetDoubleAsString(HotelSchema.PriceFromTo3.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(HotelSchema.PriceFromTo3.FieldName);
			    else
			        this.PriceFromTo3 = base.SetDoubleAsString(HotelSchema.PriceFromTo3.FieldName, value);
			}
		}
		public virtual string s_Image
		{
			get
			{
			    return this.IsColumnNull(HotelSchema.Image.FieldName) ? string.Empty : base.GetStringAsString(HotelSchema.Image.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(HotelSchema.Image.FieldName);
			    else
			        this.Image = base.SetStringAsString(HotelSchema.Image.FieldName, value);
			}
		}
		public virtual string s_Status
		{
			get
			{
			    return this.IsColumnNull(HotelSchema.Status.FieldName) ? string.Empty : base.GetIntegerAsString(HotelSchema.Status.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(HotelSchema.Status.FieldName);
			    else
			        this.Status = base.SetIntegerAsString(HotelSchema.Status.FieldName, value);
			}
		}
		public virtual string s_Priority
		{
			get
			{
			    return this.IsColumnNull(HotelSchema.Priority.FieldName) ? string.Empty : base.GetIntegerAsString(HotelSchema.Priority.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(HotelSchema.Priority.FieldName);
			    else
			        this.Priority = base.SetIntegerAsString(HotelSchema.Priority.FieldName, value);
			}
		}
		public virtual string s_StarRating
		{
			get
			{
			    return this.IsColumnNull(HotelSchema.StarRating.FieldName) ? string.Empty : base.GetIntegerAsString(HotelSchema.StarRating.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(HotelSchema.StarRating.FieldName);
			    else
			        this.StarRating = base.SetIntegerAsString(HotelSchema.StarRating.FieldName, value);
			}
		}
		public virtual string s_Address1
		{
			get
			{
			    return this.IsColumnNull(HotelSchema.Address1.FieldName) ? string.Empty : base.GetStringAsString(HotelSchema.Address1.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(HotelSchema.Address1.FieldName);
			    else
			        this.Address1 = base.SetStringAsString(HotelSchema.Address1.FieldName, value);
			}
		}
		public virtual string s_Address2
		{
			get
			{
			    return this.IsColumnNull(HotelSchema.Address2.FieldName) ? string.Empty : base.GetStringAsString(HotelSchema.Address2.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(HotelSchema.Address2.FieldName);
			    else
			        this.Address2 = base.SetStringAsString(HotelSchema.Address2.FieldName, value);
			}
		}
		public virtual string s_Address3
		{
			get
			{
			    return this.IsColumnNull(HotelSchema.Address3.FieldName) ? string.Empty : base.GetStringAsString(HotelSchema.Address3.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(HotelSchema.Address3.FieldName);
			    else
			        this.Address3 = base.SetStringAsString(HotelSchema.Address3.FieldName, value);
			}
		}
		public virtual string s_GoogleMapAddress
		{
			get
			{
			    return this.IsColumnNull(HotelSchema.GoogleMapAddress.FieldName) ? string.Empty : base.GetStringAsString(HotelSchema.GoogleMapAddress.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(HotelSchema.GoogleMapAddress.FieldName);
			    else
			        this.GoogleMapAddress = base.SetStringAsString(HotelSchema.GoogleMapAddress.FieldName, value);
			}
		}
		public virtual string s_CityID
		{
			get
			{
			    return this.IsColumnNull(HotelSchema.CityID.FieldName) ? string.Empty : base.GetIntegerAsString(HotelSchema.CityID.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(HotelSchema.CityID.FieldName);
			    else
			        this.CityID = base.SetIntegerAsString(HotelSchema.CityID.FieldName, value);
			}
		}
		public virtual string s_VideoLink
		{
			get
			{
			    return this.IsColumnNull(HotelSchema.VideoLink.FieldName) ? string.Empty : base.GetStringAsString(HotelSchema.VideoLink.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(HotelSchema.VideoLink.FieldName);
			    else
			        this.VideoLink = base.SetStringAsString(HotelSchema.VideoLink.FieldName, value);
			}
		}
		#endregion		
	
		#region Where Clause
		public class WhereClause
		{
			public WhereClause(EasyObject entity)
			{
				this._entity = entity;
			}
			
			public TearOffWhereParameter TearOff
			{
				get
				{
					if(_tearOff == null)
					{
						_tearOff = new TearOffWhereParameter(this);
					}

					return _tearOff;
				}
			}

			#region TearOff's
			public class TearOffWhereParameter
			{
				public TearOffWhereParameter(WhereClause clause)
				{
					this._clause = clause;
				}
				
				
				public WhereParameter HotelID
				{
					get
					{
							WhereParameter wp = new WhereParameter(HotelSchema.HotelID);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter Title1
				{
					get
					{
							WhereParameter wp = new WhereParameter(HotelSchema.Title1);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter Title2
				{
					get
					{
							WhereParameter wp = new WhereParameter(HotelSchema.Title2);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter Title3
				{
					get
					{
							WhereParameter wp = new WhereParameter(HotelSchema.Title3);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter InitContent1
				{
					get
					{
							WhereParameter wp = new WhereParameter(HotelSchema.InitContent1);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter InitContent2
				{
					get
					{
							WhereParameter wp = new WhereParameter(HotelSchema.InitContent2);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter InitContent3
				{
					get
					{
							WhereParameter wp = new WhereParameter(HotelSchema.InitContent3);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter Content1
				{
					get
					{
							WhereParameter wp = new WhereParameter(HotelSchema.Content1);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter Content2
				{
					get
					{
							WhereParameter wp = new WhereParameter(HotelSchema.Content2);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter Content3
				{
					get
					{
							WhereParameter wp = new WhereParameter(HotelSchema.Content3);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter PriceFrom1
				{
					get
					{
							WhereParameter wp = new WhereParameter(HotelSchema.PriceFrom1);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter PriceFrom2
				{
					get
					{
							WhereParameter wp = new WhereParameter(HotelSchema.PriceFrom2);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter PriceFrom3
				{
					get
					{
							WhereParameter wp = new WhereParameter(HotelSchema.PriceFrom3);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter PriceFromTo1
				{
					get
					{
							WhereParameter wp = new WhereParameter(HotelSchema.PriceFromTo1);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter PriceFromTo2
				{
					get
					{
							WhereParameter wp = new WhereParameter(HotelSchema.PriceFromTo2);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter PriceFromTo3
				{
					get
					{
							WhereParameter wp = new WhereParameter(HotelSchema.PriceFromTo3);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter Image
				{
					get
					{
							WhereParameter wp = new WhereParameter(HotelSchema.Image);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter Status
				{
					get
					{
							WhereParameter wp = new WhereParameter(HotelSchema.Status);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter Priority
				{
					get
					{
							WhereParameter wp = new WhereParameter(HotelSchema.Priority);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter StarRating
				{
					get
					{
							WhereParameter wp = new WhereParameter(HotelSchema.StarRating);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter Address1
				{
					get
					{
							WhereParameter wp = new WhereParameter(HotelSchema.Address1);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter Address2
				{
					get
					{
							WhereParameter wp = new WhereParameter(HotelSchema.Address2);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter Address3
				{
					get
					{
							WhereParameter wp = new WhereParameter(HotelSchema.Address3);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter GoogleMapAddress
				{
					get
					{
							WhereParameter wp = new WhereParameter(HotelSchema.GoogleMapAddress);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter CityID
				{
					get
					{
							WhereParameter wp = new WhereParameter(HotelSchema.CityID);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter VideoLink
				{
					get
					{
							WhereParameter wp = new WhereParameter(HotelSchema.VideoLink);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}


				private WhereClause _clause;
			}
			#endregion
		
			public WhereParameter HotelID
		    {
				get
		        {
					if(_HotelID_W == null)
	        	    {
						_HotelID_W = TearOff.HotelID;
					}
					return _HotelID_W;
				}
			}

			public WhereParameter Title1
		    {
				get
		        {
					if(_Title1_W == null)
	        	    {
						_Title1_W = TearOff.Title1;
					}
					return _Title1_W;
				}
			}

			public WhereParameter Title2
		    {
				get
		        {
					if(_Title2_W == null)
	        	    {
						_Title2_W = TearOff.Title2;
					}
					return _Title2_W;
				}
			}

			public WhereParameter Title3
		    {
				get
		        {
					if(_Title3_W == null)
	        	    {
						_Title3_W = TearOff.Title3;
					}
					return _Title3_W;
				}
			}

			public WhereParameter InitContent1
		    {
				get
		        {
					if(_InitContent1_W == null)
	        	    {
						_InitContent1_W = TearOff.InitContent1;
					}
					return _InitContent1_W;
				}
			}

			public WhereParameter InitContent2
		    {
				get
		        {
					if(_InitContent2_W == null)
	        	    {
						_InitContent2_W = TearOff.InitContent2;
					}
					return _InitContent2_W;
				}
			}

			public WhereParameter InitContent3
		    {
				get
		        {
					if(_InitContent3_W == null)
	        	    {
						_InitContent3_W = TearOff.InitContent3;
					}
					return _InitContent3_W;
				}
			}

			public WhereParameter Content1
		    {
				get
		        {
					if(_Content1_W == null)
	        	    {
						_Content1_W = TearOff.Content1;
					}
					return _Content1_W;
				}
			}

			public WhereParameter Content2
		    {
				get
		        {
					if(_Content2_W == null)
	        	    {
						_Content2_W = TearOff.Content2;
					}
					return _Content2_W;
				}
			}

			public WhereParameter Content3
		    {
				get
		        {
					if(_Content3_W == null)
	        	    {
						_Content3_W = TearOff.Content3;
					}
					return _Content3_W;
				}
			}

			public WhereParameter PriceFrom1
		    {
				get
		        {
					if(_PriceFrom1_W == null)
	        	    {
						_PriceFrom1_W = TearOff.PriceFrom1;
					}
					return _PriceFrom1_W;
				}
			}

			public WhereParameter PriceFrom2
		    {
				get
		        {
					if(_PriceFrom2_W == null)
	        	    {
						_PriceFrom2_W = TearOff.PriceFrom2;
					}
					return _PriceFrom2_W;
				}
			}

			public WhereParameter PriceFrom3
		    {
				get
		        {
					if(_PriceFrom3_W == null)
	        	    {
						_PriceFrom3_W = TearOff.PriceFrom3;
					}
					return _PriceFrom3_W;
				}
			}

			public WhereParameter PriceFromTo1
		    {
				get
		        {
					if(_PriceFromTo1_W == null)
	        	    {
						_PriceFromTo1_W = TearOff.PriceFromTo1;
					}
					return _PriceFromTo1_W;
				}
			}

			public WhereParameter PriceFromTo2
		    {
				get
		        {
					if(_PriceFromTo2_W == null)
	        	    {
						_PriceFromTo2_W = TearOff.PriceFromTo2;
					}
					return _PriceFromTo2_W;
				}
			}

			public WhereParameter PriceFromTo3
		    {
				get
		        {
					if(_PriceFromTo3_W == null)
	        	    {
						_PriceFromTo3_W = TearOff.PriceFromTo3;
					}
					return _PriceFromTo3_W;
				}
			}

			public WhereParameter Image
		    {
				get
		        {
					if(_Image_W == null)
	        	    {
						_Image_W = TearOff.Image;
					}
					return _Image_W;
				}
			}

			public WhereParameter Status
		    {
				get
		        {
					if(_Status_W == null)
	        	    {
						_Status_W = TearOff.Status;
					}
					return _Status_W;
				}
			}

			public WhereParameter Priority
		    {
				get
		        {
					if(_Priority_W == null)
	        	    {
						_Priority_W = TearOff.Priority;
					}
					return _Priority_W;
				}
			}

			public WhereParameter StarRating
		    {
				get
		        {
					if(_StarRating_W == null)
	        	    {
						_StarRating_W = TearOff.StarRating;
					}
					return _StarRating_W;
				}
			}

			public WhereParameter Address1
		    {
				get
		        {
					if(_Address1_W == null)
	        	    {
						_Address1_W = TearOff.Address1;
					}
					return _Address1_W;
				}
			}

			public WhereParameter Address2
		    {
				get
		        {
					if(_Address2_W == null)
	        	    {
						_Address2_W = TearOff.Address2;
					}
					return _Address2_W;
				}
			}

			public WhereParameter Address3
		    {
				get
		        {
					if(_Address3_W == null)
	        	    {
						_Address3_W = TearOff.Address3;
					}
					return _Address3_W;
				}
			}

			public WhereParameter GoogleMapAddress
		    {
				get
		        {
					if(_GoogleMapAddress_W == null)
	        	    {
						_GoogleMapAddress_W = TearOff.GoogleMapAddress;
					}
					return _GoogleMapAddress_W;
				}
			}

			public WhereParameter CityID
		    {
				get
		        {
					if(_CityID_W == null)
	        	    {
						_CityID_W = TearOff.CityID;
					}
					return _CityID_W;
				}
			}

			public WhereParameter VideoLink
		    {
				get
		        {
					if(_VideoLink_W == null)
	        	    {
						_VideoLink_W = TearOff.VideoLink;
					}
					return _VideoLink_W;
				}
			}

			private WhereParameter _HotelID_W = null;
			private WhereParameter _Title1_W = null;
			private WhereParameter _Title2_W = null;
			private WhereParameter _Title3_W = null;
			private WhereParameter _InitContent1_W = null;
			private WhereParameter _InitContent2_W = null;
			private WhereParameter _InitContent3_W = null;
			private WhereParameter _Content1_W = null;
			private WhereParameter _Content2_W = null;
			private WhereParameter _Content3_W = null;
			private WhereParameter _PriceFrom1_W = null;
			private WhereParameter _PriceFrom2_W = null;
			private WhereParameter _PriceFrom3_W = null;
			private WhereParameter _PriceFromTo1_W = null;
			private WhereParameter _PriceFromTo2_W = null;
			private WhereParameter _PriceFromTo3_W = null;
			private WhereParameter _Image_W = null;
			private WhereParameter _Status_W = null;
			private WhereParameter _Priority_W = null;
			private WhereParameter _StarRating_W = null;
			private WhereParameter _Address1_W = null;
			private WhereParameter _Address2_W = null;
			private WhereParameter _Address3_W = null;
			private WhereParameter _GoogleMapAddress_W = null;
			private WhereParameter _CityID_W = null;
			private WhereParameter _VideoLink_W = null;

			public void WhereClauseReset()
			{
				_HotelID_W = null;
				_Title1_W = null;
				_Title2_W = null;
				_Title3_W = null;
				_InitContent1_W = null;
				_InitContent2_W = null;
				_InitContent3_W = null;
				_Content1_W = null;
				_Content2_W = null;
				_Content3_W = null;
				_PriceFrom1_W = null;
				_PriceFrom2_W = null;
				_PriceFrom3_W = null;
				_PriceFromTo1_W = null;
				_PriceFromTo2_W = null;
				_PriceFromTo3_W = null;
				_Image_W = null;
				_Status_W = null;
				_Priority_W = null;
				_StarRating_W = null;
				_Address1_W = null;
				_Address2_W = null;
				_Address3_W = null;
				_GoogleMapAddress_W = null;
				_CityID_W = null;
				_VideoLink_W = null;

				this._entity.Query.FlushWhereParameters();

			}
	
			private EasyObject _entity;
			private TearOffWhereParameter _tearOff;
			
		}
	
		public WhereClause Where
		{
			get
			{
				if(_whereClause == null)
				{
					_whereClause = new WhereClause(this);
				}
		
				return _whereClause;
			}
		}
		
		private WhereClause _whereClause = null;	
		#endregion
		
		#region Aggregate Clause
		public class AggregateClause
		{
			public AggregateClause(EasyObject entity)
			{
				this._entity = entity;
			}
			
			public TearOffAggregateParameter TearOff
			{
				get
				{
					if(_tearOff == null)
					{
						_tearOff = new TearOffAggregateParameter(this);
					}

					return _tearOff;
				}
			}

			#region TearOff's
			public class TearOffAggregateParameter
			{
				public TearOffAggregateParameter(AggregateClause clause)
				{
					this._clause = clause;
				}
				
				
				public AggregateParameter HotelID
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(HotelSchema.HotelID);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter Title1
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(HotelSchema.Title1);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter Title2
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(HotelSchema.Title2);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter Title3
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(HotelSchema.Title3);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter InitContent1
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(HotelSchema.InitContent1);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter InitContent2
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(HotelSchema.InitContent2);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter InitContent3
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(HotelSchema.InitContent3);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter Content1
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(HotelSchema.Content1);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter Content2
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(HotelSchema.Content2);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter Content3
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(HotelSchema.Content3);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter PriceFrom1
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(HotelSchema.PriceFrom1);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter PriceFrom2
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(HotelSchema.PriceFrom2);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter PriceFrom3
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(HotelSchema.PriceFrom3);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter PriceFromTo1
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(HotelSchema.PriceFromTo1);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter PriceFromTo2
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(HotelSchema.PriceFromTo2);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter PriceFromTo3
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(HotelSchema.PriceFromTo3);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter Image
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(HotelSchema.Image);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter Status
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(HotelSchema.Status);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter Priority
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(HotelSchema.Priority);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter StarRating
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(HotelSchema.StarRating);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter Address1
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(HotelSchema.Address1);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter Address2
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(HotelSchema.Address2);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter Address3
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(HotelSchema.Address3);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter GoogleMapAddress
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(HotelSchema.GoogleMapAddress);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter CityID
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(HotelSchema.CityID);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter VideoLink
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(HotelSchema.VideoLink);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}


				private AggregateClause _clause;
			}
			#endregion
		
			public AggregateParameter HotelID
		    {
				get
		        {
					if(_HotelID_W == null)
	        	    {
						_HotelID_W = TearOff.HotelID;
					}
					return _HotelID_W;
				}
			}

			public AggregateParameter Title1
		    {
				get
		        {
					if(_Title1_W == null)
	        	    {
						_Title1_W = TearOff.Title1;
					}
					return _Title1_W;
				}
			}

			public AggregateParameter Title2
		    {
				get
		        {
					if(_Title2_W == null)
	        	    {
						_Title2_W = TearOff.Title2;
					}
					return _Title2_W;
				}
			}

			public AggregateParameter Title3
		    {
				get
		        {
					if(_Title3_W == null)
	        	    {
						_Title3_W = TearOff.Title3;
					}
					return _Title3_W;
				}
			}

			public AggregateParameter InitContent1
		    {
				get
		        {
					if(_InitContent1_W == null)
	        	    {
						_InitContent1_W = TearOff.InitContent1;
					}
					return _InitContent1_W;
				}
			}

			public AggregateParameter InitContent2
		    {
				get
		        {
					if(_InitContent2_W == null)
	        	    {
						_InitContent2_W = TearOff.InitContent2;
					}
					return _InitContent2_W;
				}
			}

			public AggregateParameter InitContent3
		    {
				get
		        {
					if(_InitContent3_W == null)
	        	    {
						_InitContent3_W = TearOff.InitContent3;
					}
					return _InitContent3_W;
				}
			}

			public AggregateParameter Content1
		    {
				get
		        {
					if(_Content1_W == null)
	        	    {
						_Content1_W = TearOff.Content1;
					}
					return _Content1_W;
				}
			}

			public AggregateParameter Content2
		    {
				get
		        {
					if(_Content2_W == null)
	        	    {
						_Content2_W = TearOff.Content2;
					}
					return _Content2_W;
				}
			}

			public AggregateParameter Content3
		    {
				get
		        {
					if(_Content3_W == null)
	        	    {
						_Content3_W = TearOff.Content3;
					}
					return _Content3_W;
				}
			}

			public AggregateParameter PriceFrom1
		    {
				get
		        {
					if(_PriceFrom1_W == null)
	        	    {
						_PriceFrom1_W = TearOff.PriceFrom1;
					}
					return _PriceFrom1_W;
				}
			}

			public AggregateParameter PriceFrom2
		    {
				get
		        {
					if(_PriceFrom2_W == null)
	        	    {
						_PriceFrom2_W = TearOff.PriceFrom2;
					}
					return _PriceFrom2_W;
				}
			}

			public AggregateParameter PriceFrom3
		    {
				get
		        {
					if(_PriceFrom3_W == null)
	        	    {
						_PriceFrom3_W = TearOff.PriceFrom3;
					}
					return _PriceFrom3_W;
				}
			}

			public AggregateParameter PriceFromTo1
		    {
				get
		        {
					if(_PriceFromTo1_W == null)
	        	    {
						_PriceFromTo1_W = TearOff.PriceFromTo1;
					}
					return _PriceFromTo1_W;
				}
			}

			public AggregateParameter PriceFromTo2
		    {
				get
		        {
					if(_PriceFromTo2_W == null)
	        	    {
						_PriceFromTo2_W = TearOff.PriceFromTo2;
					}
					return _PriceFromTo2_W;
				}
			}

			public AggregateParameter PriceFromTo3
		    {
				get
		        {
					if(_PriceFromTo3_W == null)
	        	    {
						_PriceFromTo3_W = TearOff.PriceFromTo3;
					}
					return _PriceFromTo3_W;
				}
			}

			public AggregateParameter Image
		    {
				get
		        {
					if(_Image_W == null)
	        	    {
						_Image_W = TearOff.Image;
					}
					return _Image_W;
				}
			}

			public AggregateParameter Status
		    {
				get
		        {
					if(_Status_W == null)
	        	    {
						_Status_W = TearOff.Status;
					}
					return _Status_W;
				}
			}

			public AggregateParameter Priority
		    {
				get
		        {
					if(_Priority_W == null)
	        	    {
						_Priority_W = TearOff.Priority;
					}
					return _Priority_W;
				}
			}

			public AggregateParameter StarRating
		    {
				get
		        {
					if(_StarRating_W == null)
	        	    {
						_StarRating_W = TearOff.StarRating;
					}
					return _StarRating_W;
				}
			}

			public AggregateParameter Address1
		    {
				get
		        {
					if(_Address1_W == null)
	        	    {
						_Address1_W = TearOff.Address1;
					}
					return _Address1_W;
				}
			}

			public AggregateParameter Address2
		    {
				get
		        {
					if(_Address2_W == null)
	        	    {
						_Address2_W = TearOff.Address2;
					}
					return _Address2_W;
				}
			}

			public AggregateParameter Address3
		    {
				get
		        {
					if(_Address3_W == null)
	        	    {
						_Address3_W = TearOff.Address3;
					}
					return _Address3_W;
				}
			}

			public AggregateParameter GoogleMapAddress
		    {
				get
		        {
					if(_GoogleMapAddress_W == null)
	        	    {
						_GoogleMapAddress_W = TearOff.GoogleMapAddress;
					}
					return _GoogleMapAddress_W;
				}
			}

			public AggregateParameter CityID
		    {
				get
		        {
					if(_CityID_W == null)
	        	    {
						_CityID_W = TearOff.CityID;
					}
					return _CityID_W;
				}
			}

			public AggregateParameter VideoLink
		    {
				get
		        {
					if(_VideoLink_W == null)
	        	    {
						_VideoLink_W = TearOff.VideoLink;
					}
					return _VideoLink_W;
				}
			}

			private AggregateParameter _HotelID_W = null;
			private AggregateParameter _Title1_W = null;
			private AggregateParameter _Title2_W = null;
			private AggregateParameter _Title3_W = null;
			private AggregateParameter _InitContent1_W = null;
			private AggregateParameter _InitContent2_W = null;
			private AggregateParameter _InitContent3_W = null;
			private AggregateParameter _Content1_W = null;
			private AggregateParameter _Content2_W = null;
			private AggregateParameter _Content3_W = null;
			private AggregateParameter _PriceFrom1_W = null;
			private AggregateParameter _PriceFrom2_W = null;
			private AggregateParameter _PriceFrom3_W = null;
			private AggregateParameter _PriceFromTo1_W = null;
			private AggregateParameter _PriceFromTo2_W = null;
			private AggregateParameter _PriceFromTo3_W = null;
			private AggregateParameter _Image_W = null;
			private AggregateParameter _Status_W = null;
			private AggregateParameter _Priority_W = null;
			private AggregateParameter _StarRating_W = null;
			private AggregateParameter _Address1_W = null;
			private AggregateParameter _Address2_W = null;
			private AggregateParameter _Address3_W = null;
			private AggregateParameter _GoogleMapAddress_W = null;
			private AggregateParameter _CityID_W = null;
			private AggregateParameter _VideoLink_W = null;

			public void AggregateClauseReset()
			{
				_HotelID_W = null;
				_Title1_W = null;
				_Title2_W = null;
				_Title3_W = null;
				_InitContent1_W = null;
				_InitContent2_W = null;
				_InitContent3_W = null;
				_Content1_W = null;
				_Content2_W = null;
				_Content3_W = null;
				_PriceFrom1_W = null;
				_PriceFrom2_W = null;
				_PriceFrom3_W = null;
				_PriceFromTo1_W = null;
				_PriceFromTo2_W = null;
				_PriceFromTo3_W = null;
				_Image_W = null;
				_Status_W = null;
				_Priority_W = null;
				_StarRating_W = null;
				_Address1_W = null;
				_Address2_W = null;
				_Address3_W = null;
				_GoogleMapAddress_W = null;
				_CityID_W = null;
				_VideoLink_W = null;

				this._entity.Query.FlushAggregateParameters();

			}
	
			private EasyObject _entity;
			private TearOffAggregateParameter _tearOff;
			
		}
	
		public AggregateClause Aggregate
		{
			get
			{
				if(_aggregateClause == null)
				{
					_aggregateClause = new AggregateClause(this);
				}
		
				return _aggregateClause;
			}
		}
		
		private AggregateClause _aggregateClause = null;	
		#endregion
	}
}
